package com.bianxianmao.find.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bianxianmao.R;
import com.bianxianmao.base.BaseFragment;
import com.bianxianmao.duobao.activity.NewrechargeActivity;
import com.bianxianmao.duobao.activity.ShowListActivity;
import com.bianxianmao.find.activity.AllreturnActivity;
import com.bianxianmao.find.activity.DoubleActivity;
import com.bianxianmao.find.activity.GoodluckActvity;
import com.bianxianmao.find.activity.GuideActivity;
import com.bianxianmao.find.activity.NewActivity;
import com.bianxianmao.find.activity.RechargedoubleActivity;


/**
 * Created by Administrator on 2017/7/7 0007.
 */

public class FindFragment extends BaseFragment implements View.OnClickListener {
//    //晒单分享
//    public static String SHARELISTURL = "http://duobao.bianxianmao.com/#/tab/find/single";
//    //夺宝攻略
//    public static String GUIDEURL = "http://duobao.bianxianmao.com/#/tab/find/guize";
//    //不中全返
//    public static String NOTALLRETURNURL = "";
//    //新手特权
//    public static String NEWUSERURL = "http://duobao.bianxianmao.com/#/tab/home/newcomer";
//    //双人夺宝
//    public static String PKURL = "http://duobao.bianxianmao.com/#/tab/home/two";
//    //充值100送100！
//    public static String RECHARGEURL = "http://1.migree.com.cn/qmdb/shop/weixin/index.html#/tab/find/payReturn";
//    //100元秒变188元！
//    public static String NEWRECHARGEURL = "http://duobao.bianxianmao.com/#/tab/find/newcomerRechargeReturn";
//    //刮出好运
//    public static String GOODLUCKURL = "http://1.migree.com.cn/qmdb/shop/weixin/index.html#/tab/find/imageText?url=https:%2F%2Fbuy.bianxianmao.com%2Fcommon%2FawardModel%2Fggk.html%3FappKey%3D%26activityid%3D9%26business%3Dyydb";

    private ImageView sharelist;
    private ImageView guide;
    private LinearLayout notallreturn;
    private LinearLayout newuser;
    private LinearLayout doublepk;
    private LinearLayout newrecharge;
    private LinearLayout goodluck;

    @Override
    public View initView() {
        View view = View.inflate(mContext, R.layout.fragment_find, null);
        sharelist = (ImageView) view.findViewById(R.id.iv_sharelist);
        guide = (ImageView) view.findViewById(R.id.iv_guide);
        notallreturn = (LinearLayout) view.findViewById(R.id.ll_not_allreturn);
        newuser = (LinearLayout) view.findViewById(R.id.ll_newuser);
        doublepk = (LinearLayout) view.findViewById(R.id.ll_double);
        newrecharge = (LinearLayout) view.findViewById(R.id.ll_newrecharge);
        goodluck = (LinearLayout) view.findViewById(R.id.ll_goodluck);
        return view;
    }

    @Override
    public void initData() {
        sharelist.setOnClickListener(this);
        guide.setOnClickListener(this);
        notallreturn.setOnClickListener(this);
        newuser.setOnClickListener(this);
        newrecharge.setOnClickListener(this);
        goodluck.setOnClickListener(this);
        doublepk.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_sharelist://晒单分享
                startActivity(new Intent(getContext(), ShowListActivity.class));
                break;
            case R.id.iv_guide://夺宝攻略
                startActivity(new Intent(getContext(), GuideActivity.class));
                break;
            case R.id.ll_not_allreturn://不中全返
                startActivity(new Intent(getContext(), AllreturnActivity.class));
                break;
            case R.id.ll_newuser://首单特权
                startActivity(new Intent(getContext(), NewActivity.class));
                break;
            case R.id.ll_double://双人夺宝
                startActivity(new Intent(getContext(), DoubleActivity.class));
                break;
            case R.id.ll_recharge_double:
                startActivity(new Intent(getContext(), RechargedoubleActivity.class));
                break;
            case R.id.ll_newrecharge://100元秒变188元！
                startActivity(new Intent(getContext(), NewrechargeActivity.class));
                break;
            case R.id.ll_goodluck://刮出好运
                startActivity(new Intent(getContext(), GoodluckActvity.class));
                break;
        }
    }
}
